<?php

class foo{
    public function printItem($string){
        echo 'Foo:'.$string.PHP_EOL;
    }
}

class bar extends foo{
    public function printItem($string){
        echo 'Bar:'.$string.PHP_EOL;
    }
    
}

$foo=new foo();
$foo->printItem("baz");

?>